package com.avic.modules.record.service.impl;

import com.avic.common.service.impl.BaseServiceImpl;
import com.avic.modules.record.domain.ContinuousOptimize;
import com.avic.modules.record.service.ContinuousOptimizeService;
import com.avic.modules.record.service.mapper.ContinuousOptimizeMapper;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author zhangzikang
 * @date 2023-09-4
 */
@Service(value = "continuousOptimizeService")
@AllArgsConstructor
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
public class ContinuousOptimizeServiceImpl extends BaseServiceImpl<ContinuousOptimizeMapper, ContinuousOptimize> implements ContinuousOptimizeService {

    /**
     * 查询最新信息
     *
     * @return
     */
    @Override
    public ContinuousOptimize queryContinuousOptimize() {
        return this.getById(4);
    }

    /**
     * 修改信息
     */
    @Override
    public void editContinuousOptimize(ContinuousOptimize continuousOptimize) {
        continuousOptimize.setNum(4);
        this.updateById(continuousOptimize);
    }
}
